package com.lyc.wanandroid_kotlin.ui.activity.search.mvp.contract

import com.lyc.wanandroid_kotlin.base.IModel
import com.lyc.wanandroid_kotlin.base.IPresenter
import com.lyc.wanandroid_kotlin.base.IView
import com.lyc.wanandroid_kotlin.bean.HotSearchBean
import com.lyc.wanandroid_kotlin.bean.HttpResult
import com.lyc.wanandroid_kotlin.bean.SearchHistoryBean
import io.reactivex.Observable

/**
 * ClassName:com.lyc.wanandroid_kotlin.ui.activity.search.mvp.contract
 * Description:
 */
interface SearchContract {

    interface View : IView {
        fun showHistoryData(historyBeans: MutableList<SearchHistoryBean>)

        fun showHotSearchData(hotSearchDatas: MutableList<HotSearchBean>)
    }

    interface Presenter : IPresenter<View> {
        fun queryHistory()

        fun saveSearchKey(key: String)

        fun deleteById(id: Long)

        fun clearAllHistory()

        fun getHotSearchData()
    }

    interface Model : IModel {
        fun getHotSearchData(): Observable<HttpResult<MutableList<HotSearchBean>>>

    }
}